﻿namespace System.Runtime.CompilerServices
{

#pragma warning disable 8500

    /// <summary>
    /// 
    /// </summary>
    unsafe public static class Unsafe
    {

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="t"></param>
        /// <returns></returns>
        public static unsafe T* AsPointer<T>(ref T t) where T : struct
        {
            fixed (T* ptr = &t)
            {
                return ptr;
            }
        }
    }

}
